"""
@FileName：config.py\n
@Description：\n
@Author：锦沐Python\n
@Time：2024/8/19 11:57\n
"""
import re
from pathlib import Path


WIN_NAME = "锦沐Python-正则表达式测试程序"
THEME_STYLE = "cyborg"  # "darkly"
WIN_WIDTH = 1000
WIN_HEIGHT = 700

# 打包使用
# _current_path = Path(".").resolve() / "_internal"

_current_path = Path(".").resolve()
print(_current_path)
# 图标
ICON_PATH = _current_path / "src" / "assest" / "icon.ico"

# 模式
ENCODING_MODE = [re.UNICODE, re.ASCII]
ENCODING_MODE_NAME = ["UNICODE", "ASCII"]

MODE = [re.IGNORECASE, re.LOCALE, re.MULTILINE, re.DOTALL, re.VERBOSE]
MODE_NAME = ["IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE"]

# 菜单按钮
MEAU_ITEMS = ["保存匹配式", "匹配式测试", "替换匹配项", "代码生成", "导出匹配项", "常用匹配式", "学习模式"]

# 数据
CSV_DATA_PATH = _current_path / "data" / "data.csv"

CSV_SAVE_PATH = Path(".").resolve() / "export_data"
if not CSV_SAVE_PATH.exists():
    CSV_SAVE_PATH.mkdir(parents=True)

CSV_LEARN_PATH = _current_path / "data" / "learn_data.csv"

NOTE_BOOK_PAGE = ["替换", "常用表达式", "学习模式"]
# 表达式标题
ExpressionsDetailTitle = "选项"
ExpressionsDetailCloums = ["简介", "内容"]

# 测试匹配项详情
TestExpressDetailCloum = ["序号", "行列位置", "匹配内容"]

# 颜色
COLORS = {
    "info": "white",
    "error": "red",
    "warn": "yellow"
}
